Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flakiness in ManualActivityCompletionWorkflowTest #937

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

natemort
Copy link
Member

@natemort natemort commented Nov 1, 2024

The operations here are flaky because we're starting an activity and then attempting to cancel/complete/fail it in parallel. We need the second activity to block until the first one has started, and there's no way to orchestrate that within the workflow. The best we can do is make the acitivites block until the ActivityTask is available.

What changed?

  • Fix flaky test

Why?

  • To reduce wasted effort rerunning tests.

How did you test it?

Potential risks

Release notes

Documentation Changes

Copy link
Member

@Groxx Groxx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, makes a lot of sense (assuming it doesn't deadlock or something). thanks!

Copy link

codecov bot commented Nov 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (master@d4b2d0b). Learn more about missing BASE report.
Report is 2 commits behind head on master.

Additional details and impacted files

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d4b2d0b...0ece64a. Read the comment docs.

The operations here are flaky because we're starting an activity and then attempting to cancel/complete/fail it in parallel. We need the second activity to block until the first one has started, and there's no way to orchestrate that within the workflow. The best we can do is make the acitivites block until the ActivityTask is available.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 2594

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 4 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.03%) to 76.079%

Files with Coverage Reduction New Missed Lines %
src/main/java/com/uber/cadence/internal/testservice/TestWorkflowMutableStateImpl.java 1 85.33%
src/main/java/com/uber/cadence/internal/sync/WorkflowThreadImpl.java 1 77.32%
src/main/java/com/uber/cadence/serviceclient/WorkflowServiceTChannel.java 2 86.83%
Totals Coverage Status
Change from base Build 2590: 0.03%
Covered Lines: 14748
Relevant Lines: 19385

💛 - Coveralls

@natemort natemort merged commit 9746755 into cadence-workflow:master Nov 4, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants